package com.huike.report.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.huike.clues.domain.vo.IndexStatisticsVo;

/**
 * 首页统计分析的Mapper
 * @author Administrator
 *
 */
public interface ReportMapper {
    /**
     *今日简报
     */
    //今日线索数目
    Integer selectTodayCluesNum(@Param("today") String today, @Param("username") String username);

    //今日商机数目
    Integer selectTodayBusinessNum(@Param("today") String today,@Param("username") String username);

    //今日合同数目
    Integer selectTodayContractNum(@Param("today") String today,@Param("username") String username);

    //今日销售金额
    Double selectTodaySalesAmount(@Param("today") String today,@Param("username") String username);

    /**
     * 待办数据统计
     */

    //待跟进线索
    Integer selectTofollowedCluesNum(@Param("beginCreateTime") String beginCreateTime,@Param("endCreateTime") String endCreateTime,@Param("username") String userName);

    //待跟进商机
    Integer selectTofollowedBusinessNum(@Param("beginCreateTime") String beginCreateTime,@Param("endCreateTime") String endCreateTime,@Param("username") String userName);

    //待分配线索
    Integer selectToallocatedCluesNum(@Param("beginCreateTime") String beginCreateTime,@Param("endCreateTime") String endCreateTime,@Param("username") String userName);

    //待分配商机
    Integer selectToallocatedBusinessNum(@Param("beginCreateTime") String beginCreateTime,@Param("endCreateTime") String endCreateTime,@Param("username") String userName);


    /**
     * 统计分析 线索统计 新增线索数量折线图
     */

    //获取每天新增的线索数量
    List<Map<String,Object>> selectTodayCount(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime") String endCreateTime);


    /**
     *统计分析 客户统计 学科客户分布饼图
     */

    //获取每个学科的数量
    List<Map<String,Object>> selectSubjectStatistics(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime") String endCreateTime);

    //获取学科的名称
    String selectName(@Param("value") String value);


}
